<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>uimenu</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : 19/04/2005</div>
    <p>
      <b>uimenu</b> -  Create a menu or a submenu in a figure</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>h=uimenu([prop1,val1] [,prop2, val2] ...)  </tt>
      </dd>
      <dd>
        <tt>h=uimenu(parent,[prop1, val1] [,prop2, val2] ...)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>parent </b>
        </tt>: integer Handle of menu's parent</li>
      <li>
        <tt>
          <b>prop{1, 2 ...}</b>
        </tt>: string character name of a property to set up</li>
      <li>
        <tt>
          <b>val{1, 2 ...}</b>
        </tt>: scilab object value to affect to the corresponding property</li>
      <li>
        <tt>
          <b>h</b>
        </tt>: integer handle of the corresponding menu</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
    This allows to create menus in a figure.
    If <tt>
        <b>parent</b>
      </tt> is a figure, then
    the menu item will be added to the menu bar of the figure.
    If <tt>
        <b>parent</b>
      </tt> is a menu item , then the new item will be added to the parent
    item, allowing to create cascaded submenu.
    To create a customized menu, you can use the properties listed below:
    </p>
    <h3>
      <font color="blue">Properties</font>
    </h3>
    <dl>
      <dd>
        <li>
          <b>
            <font color="maroon">callback</font>
          </b>string: allows to set up the scilab instruction to call when the item is selected by the user.</li>
        <li>
          <b>
            <font color="maroon">label</font>
          </b>string: allows to set up the text appearing for the item.</li>
        <li>
          <b>
            <font color="maroon">tag</font>
          </b>string: this property is generally used to identify the menu. It allows to give it a "name". Mainly used in conjontion with <a href="findobj.htm">
            <tt>
              <b>findobj</b>
            </tt>
          </a>.</li>
      </dd>
    </dl>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

f=figure('position', [10 10 300 200]);
// create a figure
m=uimenu(f,'label', 'windows');
// create an item on the menu bar
m1=uimenu(m,'label', 'operations');
m2=uimenu(m,'label', 'quit scilab', 'callback', "exit");
//create two items in the menu "windows"
m11=uimenu(m1,'label', 'new window', 'callback',"xselect()");
m12=uimenu(m1,'label', 'clear  window', 'callback',"xbasc()");
// create a submenu to the item "operations"
close(f);
// close the figure
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="figure.htm">
        <tt>
          <b>figure</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="uicontrol.htm">
        <tt>
          <b>uicontrol</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="../graphics/set.htm">
        <tt>
          <b>set</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="../graphics/get.htm">
        <tt>
          <b>get</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>Bertrand Guiheneuf</p>
  </body>
</html>
